﻿@using XStudio.XCRF.Data.Entities.BasicInfo
@model BasicInfo
@(Html.Telerik().Grid<FamilyHistory>().Name("FamilyHistoryViewGrid").Footer(false)
.DataKeys(keys => keys.Add(a => a.ID))
.Columns(columns =>
{
    columns.Bound(a => a.Content).Title("内容");
    columns.Command(commands =>
    {
        commands.Edit().ButtonType(GridButtonType.Text);
        commands.Delete().ButtonType(GridButtonType.Text);
    }).Title("操作");
})
.ToolBar(commands => commands.Insert().ButtonType(GridButtonType.Text))
.DataBinding(dataBinding =>
{
    dataBinding.Ajax()
        .Select<BasicInfoController>(c => c._FamilyHistoryList(Model.ID))
        .Insert<BasicInfoController>(c => c._FamilyHistoryAdd(null, Model.ID))
        .Update<BasicInfoController>(c => c._FamilyHistoryEdit(null))
        .Delete<BasicInfoController>(c => c._FamilyHistoryDelete(null));
})
.Editable(edit => edit.Mode(GridEditMode.InLine))
)